﻿using _01_Tower4._0.CharacterBase;
using _01_Tower4._0.GameFrame.System;
using _01_Tower4._0.Items.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _01_Tower4._0.Items
{
    internal class Key2_1 : KeyBase
    {
        public Key2_1() : base(303, "钥匙2.1","可以打开二层的门,但好像还需要一把",  "你尝试对空气开门。。。")
        {
        }

        public override bool Use()
        {
            base.Use();
            if (!Hero.canUseKey1)
            {
                InfoSystem.Instance.AddInfo($"使用了{Name}", ConsoleColor.Yellow);
                InfoSystem.Instance.AddInfo(FeedBack);
                return Hero.canUseKey1;
            }
            else
            {
                InfoSystem.Instance.AddInfo($"使用了{Name}", ConsoleColor.Yellow);
                FeedBack = "打开了一道锁";
                InfoSystem.Instance.AddInfo(FeedBack);
                Hero.unLock++;
                if (Hero.unLock == 2)
                {
                    Hero.doorIsOpen2 = true;
                    InfoSystem.Instance.AddInfo($"门打开了");
                }
                return Hero.canUseKey1;
            }
        }
    }
}
